<?php
declare(strict_types=1);

namespace app\admin\service;

use app\admin\model\ResourceRecommend as ResourceRecommendModel;

class ResourceRecommendService
{
    /**
     * 单社群推荐
     * @param $where
     * @return array|\think\Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function findResourceRecommend($where)
    {
        return ResourceRecommendModel::findResourceRecommend($where);
    }

    /**
     * 添加社群推荐
     * @param $data
     * @return ResourceRecommendModel|\think\Model
     */
    public static function createResourceRecommend($data)
    {
        return ResourceRecommendModel::createResourceRecommend($data);
    }

    /**
     * 删除推荐列表
     * @param $where
     * @return bool
     */
    public static function delResourceRecommend($where)
    {
        return ResourceRecommendModel::delResourceRecommend($where);
    }
}